package com.mew.chess.core.game.shbz.game;

import com.mew.chess.core.game.shbz.game.common.BulletBO;
import lombok.*;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;


@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(of = {"userId"})
@Builder
public class ShbzSeatManager {

    private int tableId;
    private int seatNo; //座位号
    private long userId;

    private final ConcurrentMap<Integer, BulletBO> bulletMap = new ConcurrentHashMap<>(16);
    private long seatTime;


    public void addBulletId(int bulletId, int betNumber, byte dbType){
        bulletMap.put(bulletId, BulletBO.builder().id(bulletId).betNumber(betNumber).bdType(dbType).build());
    }

    public BulletBO getBullet(int bulletId){
        return bulletMap.remove(bulletId);
    }


}
